package bb.lanxing.lib.devices.ble.ble.characteristic.light;

import android.bluetooth.BluetoothGatt;
import android.bluetooth.BluetoothGattCharacteristic;
import bb.lanxing.lib.devices.ble.ble.base.BaseBleCharacteristic;
import bb.lanxing.lib.devices.ble.ble.base.BaseBleService;
//import bb.lanxing.lib.devices.sprint.coroutines.DeviceCoroutinesScopeeKt;
import java.util.UUID;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.coroutines.BuildersKt;
import kotlinx.coroutines.flow.MutableStateFlow;
import kotlinx.coroutines.flow.StateFlowKt;

public final class LightMachineStatusCharacteristics extends BaseBleCharacteristic {
    private MutableStateFlow<LightMachineStatus> lightMachineStatus;

    public LightMachineStatusCharacteristics(BaseBleService bleService) {
        super(bleService);
        Intrinsics.checkNotNullParameter(bleService, "bleService");
        this.lightMachineStatus = StateFlowKt.MutableStateFlow(null);
    }

    public MutableStateFlow<LightMachineStatus> getLightMachineStatus() {
        return this.lightMachineStatus;
    }

    public void setLightMachineStatus(MutableStateFlow<LightMachineStatus> mutableStateFlow) {
        Intrinsics.checkNotNullParameter(mutableStateFlow, "<set-?>");
        this.lightMachineStatus = mutableStateFlow;
    }

    @Override
    public UUID targetUUID() {
        UUID fromString = UUID.fromString("8CE5DD02-0A4D-11E9-AB14-D663BD873D93");
        Intrinsics.checkNotNullExpressionValue(fromString, "fromString(BLEAttributes.BLE_LIGHT_MACHINE_STATUS)");
        return fromString;
    }

    @Override
    public void onValueUpdate(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic) {
        Intrinsics.checkNotNullParameter(gatt, "gatt");
        Intrinsics.checkNotNullParameter(characteristic, "characteristic");
//        BuildersKt.launch$default(DeviceCoroutinesScopeeKt.getDeviceStateScope(getBleService().getDevice()), null, null, new LightMachineStatusCharacteristics$onValueUpdate$1(this, characteristic, null), 3, null);
    }
}
